package com.hebeu.gfh.mapper;

import com.hebeu.gfh.pojo.po.User;
import com.hebeu.gfh.pojo.vo.loginInfo;
import com.hebeu.gfh.pojo.vo.updatepwd;
import org.apache.ibatis.annotations.Param;
import org.springframework.cglib.core.ClassInfo;
import org.springframework.stereotype.Repository;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Author: 刘剑利
 * @Version: v1.0
 */
@Repository
@Mapper
public interface UserMapper {
    //添加用户(学生)
    public void addUser(User user);
    //添加用户(管理员)
    public void addAdmin(User user);
    //删除用户
    public void deleteUser(int userId);
    //根据用户id查询用户信息
    public User findUserByuserId(int userId);
    //修改用户信息
    public void updateUserByuserId(User user);
    //查询所有用户信息
    public List<User> findAllUser();
    //根据班级信息查询所属学生
    List<User> findUserByClassInfo(ClassInfo classInfo);

    public User login(loginInfo loginInfo);

    int findclubNumByuserId(int userId);

    int findactivityNumByuserId(int userId);

    public void updatepwd(updatepwd updatepwd);

    public int getIdByuserNum(int userNum);

    public int findUserIdByUserName(String userName);

    public void updateRole(@Param("role") int role,@Param("userId") int userId);
    //模糊查询
}
